package model;

import java.util.List;

/**
 *
 * @author cska
 */
public class Lab_Student {

    private Long id;
    private Student student;
    private Lab lab;
    private String real_date;
    private int mark;
    private List<Interim> interims;

    public Lab_Student() {
    }

    public Lab_Student(Student student, Lab lab, String real_date, int mark) {
        this.student = student;
        this.lab = lab;
        this.real_date = real_date;
        this.mark = mark;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public void setLab(Lab lab) {
        this.lab = lab;
    }

    public void setReal_date(String real_date) {
        this.real_date = real_date;
    }

    public void setMark(int mark) {
        this.mark = mark;
    }

    public void setInterims(List<Interim> interims) {
        this.interims = interims;
    }

    public Long getId() {
        return id;
    }

    public Student getStudent() {
        return student;
    }

    public Lab getLab() {
        return lab;
    }

    public String getReal_date() {
        return real_date;
    }

    public int getMark() {
        return mark;
    }

    public List<Interim> getInterims() {
        return interims;
    }

    @Override
    public String toString() {
        String s = "";
        s += student.toString();
        s += " сдал лабораторную работу: " + lab.toString();
        s += " " + real_date;
        s += " и получил оценку: ";

        switch (mark) {
            case 0:
                s+= "незачет.";
                break;
            case 1:
                s+= "зачет.";
                break;
            case 2:
                s+= "неуд.";
                break;
            case 3:
                s+= "удв.";
                break;
            case 4:
                s+= "хор.";
                break;
            case 5:
                s+= "отл.";
                break;
        }

        return s;
    }

}
